package com.zd.commodity.productMng.action;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.zd.commodity.action.BaseAction;
import com.zd.commodity.productMng.biz.IProductAttrMappingBiz;
import com.zd.commodity.productMng.entity.ProductAttrMapping;
@Scope("prototype")
@Controller
public class ProductAttrMappingAction extends BaseAction<ProductAttrMapping> {
	private IProductAttrMappingBiz productAttrMappingBiz;
	private String attrId;
	
	public void downloadTemple() throws Exception{
		String[] title = new String[]{"分类名","属性组名","属性名","供应商名称","供应商分类名","供应商属性组名","供应商属性名"};
		super.excelExport("供应商上传模板", new ArrayList(),title,null);
	}
	
	public void excelImportMapping(){
		String message = productAttrMappingBiz.addMappingByExcel();
		write(message);
	}
	public String getAttrId() {
		return attrId;
	}
	public void setAttrId(String attrId) {
		this.attrId = attrId;
	}
	public IProductAttrMappingBiz getProductAttrMappingBiz() {
		return productAttrMappingBiz;
	}
	@Autowired
	public void setProductAttrMappingBiz(
			IProductAttrMappingBiz productAttrMappingBiz) {
		this.setBaseBiz(productAttrMappingBiz);
		this.productAttrMappingBiz = productAttrMappingBiz;
	}
}
